import request from '@/utils/request_miva_work.js';

// 帐号密码登录
export function loginPassword({ phone, email, password, verifyCode } = {}) {
  return request({
    url: '/login',
    method: 'POST',
    data: { phone, email, password, verifyCode }
  });
}
// 获取个人信息
export function userInfo() {
  return request({
    url: '/userInfo',
    method: 'GET'
  });
}
// 退出登录
export function logout() {
  return request({
    url: '/logout',
    method: 'GET'
  });
}
// 获取用户列表
export function getUserList({ page, size }) {
  return request({
    url: '/userList',
    method: 'GET',
    params: { page, size }
  });
}
// 获取其他用户信息
export function userInfoById({ id }) {
  return request({
    url: '/userInfo',
    method: 'GET',
    params: { uid: id }
  });
}
